package com.apanal.qlife.org.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.apanal.qlife.common.page.Page;
import com.apanal.qlife.org.model.Organization;

public interface OrganizationMapper {
	int deleteByPrimaryKey(Long orgId);

	int saveOrganization(Organization organization);

	int insertSelective(Organization record);

	Organization selectByPrimaryKey(Long orgId);
	
	Organization selectTrench(Long orgId);

	int update(Organization record);

	int updateByPrimaryKey(Organization record);
	
	List<Organization> findOrganizationList(@Param(value = "o")Organization organization,@Param(value = "p")Page page);
	
	List<Organization> findTrenchList(@Param(value = "o")Organization organization,@Param(value = "p")Page page);
	
	List<Organization> findTenementList(@Param(value = "o")Organization organization,@Param(value = "p")Page page);
	
	int findOrganizationListCount(@Param(value = "o")Organization organization);
	
	int findTrenchListCount(@Param(value = "o")Organization organization);
	
	int findTenementListCount(@Param(value = "o")Organization organization);
	
	int selectOrgPageCount(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	List<Organization> selectOrgForPage(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	Organization selectOrgDetails(Long orgId);

	Organization selectOrgDetails1(Long orgId);

	Organization selectOrgDetails2(Long orgId);

	List<Organization> findTenementList(Organization organization);
	
	List<Organization> findOrgList(Organization organization);

	Organization findPlatByUser(Long useId);

	List<Organization> findAllPlat();

	int selectRelationForPageCount(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	List<Organization> selectRelationForPage(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	List<Organization> select(Organization param);

	List<Organization> findAllQd();

	Organization selectOrgById(Long orgId);

	int selectOrgAutditPageCount(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	List<Organization> selectOrgAutditForPage(@Param(value = "e")Organization org, @Param(value = "p")Page page);

	int selectCountAudit(Organization org);
	

}